/*
* 
* Copyright (C) 2004-2007  Autodesk, Inc.
* 
* This library is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser
* General Public License as published by the Free Software Foundation.
* 
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
* 
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*
*/

#include "stdafx.h"
#include "mgCoverageDescription.h"
#include "FdoWcsCoverageDescription.h"

NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::CoverageDescription(FdoWcsCoverageDescription* coveDesc)
{
    UnmanagedObject = coveDesc;
}

NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::~CoverageDescription()
{
    delete UnmanagedObject;
}

FdoWcsCoverageDescription* NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::GetImpObj()
{
    return UnmanagedObject;
}

String^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Identifier::get()
{
    FdoString* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetIdentifier())

    return CHECK_STRING(result);
}

System::Void NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Identifier::set(String^ value)
{
    EXCEPTION_HANDLER(GetImpObj()->SetIdentifier(StringToUni(value)))
}

String^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Title::get()
{
    FdoString* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetTitle())

    return CHECK_STRING(result);
}

System::Void NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Title::set(String^ value)
{
    EXCEPTION_HANDLER(GetImpObj()->SetTitle(StringToUni(value)))
}

String^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Abstract::get()
{
    FdoString* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetAbstract())

    return CHECK_STRING(result);
}

System::Void NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::Abstract::set(String^ value)
{
    EXCEPTION_HANDLER(GetImpObj()->SetAbstract(StringToUni(value)))
}

NAMESPACE_OSGEO_COMMON::StringCollection^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::KeywordList::get()
{
    FdoStringCollection* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetKeywordList())

    return (gcnew NAMESPACE_OSGEO_COMMON::StringCollection(IntPtr(result), true));
}

NAMESPACE_OSGEO_COMMON::StringCollection^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::SupportedCRSNames::get()
{
    FdoStringCollection* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetSupportedCRSNames())

    return (gcnew NAMESPACE_OSGEO_COMMON::StringCollection(IntPtr(result), true));
}

NAMESPACE_OSGEO_COMMON::StringCollection^ NAMESPACE_OSGEO_FDO_PROVIDERS_WCS::CoverageDescription::SupportedFormatNames::get()
{
    FdoStringCollection* result;

    EXCEPTION_HANDLER(result = GetImpObj()->GetSupportedFormatNames())

    return (gcnew NAMESPACE_OSGEO_COMMON::StringCollection(IntPtr(result), true));
}
